import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        productId: 1,
        loginProvider: "",
        openid: null,
        isRegister: false
    },
    mutations: {
        productionUrl(state, type) {
            state.productId = type;
        },
    },
    actions: {
        productionUrl(context, id) {
            console.log(id)
            context.commit('productionUrl', id)
        }
    }
})

export default store